package com.gjsh.a_extends;

public class Test01 {
    public static void main(String[] args) {
        Teacher tacher = new Teacher();
        tacher.name = "张三";
        tacher.age = 19;
        tacher.work();
        System.out.println(tacher.name + ":" + tacher.age);

//        tacher.eat()  子类只能访问父类非私有,私有的访问不了

        Manager manager = new Manager();
        manager.name = "李四";
        manager.age = 18;
        System.out.println(manager.name + ":" + manager.age);
    }
}
